<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>手动执行道路信息页面</title>
<script type="text/javascript" src="js/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(function(){
	$.ajax({
		url : "MaexecuteOilOpenAction!getOilOpenHistoryCount",
		data : { },
		dateType : 'text',
		type : 'post',
		error : function() {
		},
		success : function(o) {
			eval('var json = '+o);
			$("#threeDays").text(json.value);
			if(json.exeThread=="1"){
				$("#exeProcess").text("正在统计"+json.day+",当前统计数据量为："+json.exeCount);
			}else{
				$("#exeProcess").text("当前没有油门开度统计作业执行");
			}
		}
	});
});
function CheckForm(){
	var workDay = document.getElementById("workDay");
	var dataBaseIp = document.getElementById("dataBaseIp");
	var user = document.getElementById("user");
	var password = document.getElementById("password");
	var MsgPDataBase = document.getElementById("MsgPDataBase");
	if(workDay.value==""){
		alert("统计日期必填！");
		$("#workDay").focus();
		return false;
	}
	if(dataBaseIp.value==""){
		alert("数据库连接地址必填！");
		$("#dataBaseIp").focus();
		return false;
	}
	if(user.value==""){
		alert("用户名必填！");
		$("#user").focus();
		return false;
	}
	if(password.value==""){
		alert("密码必填！");
		$("#password").focus();
		return false;
	}
	if(MsgPDataBase.value==""){
		alert("原始数据所在数据库名称必填！");
		$("#MsgPDataBase").focus();
		return false;
	}
	return true;
}
</script>
</head>
<body>
<form action="MaexecuteOilOpenAction!executeOilOpen" method="post" id="test" name="test" onsubmit="return CheckForm();">
  <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
    <tr align="center">
      <td colspan="2">手动统计道路信息</td>
    </tr>
    <tr>
      <td align="right" style="width: 50%">统计日期</td>
      <td><input type="text" name="workDay" id="workDay"></td>
    </tr>
    <tr>
      <td align="right" style="width: 50%">数据库连接地址</td>
      <td><input type="text" name="dataBaseIp" id="dataBaseIp"></td>
    </tr>
    <tr>
      <td align="right" style="width: 50%">用户名</td>
      <td><input type="text" name="user" id="user"></td>
    </tr>
    <tr>
      <td align="right" style="width: 50%">密码</td>
      <td><input type="password" name="password" id="password"></td>
    </tr>
    <tr>
      <td align="right" style="width: 50%">Msg_PGN_yyyyMMdd所在数据库名称</td>
      <td><input type="text" name="MsgPDataBase" id="MsgPDataBase"></td>
    </tr>
     <tr>
      <td align="right" style="width: 50%">近三天统计数据量:</td>
      <td id="threeDays"></td>
    </tr>
    <tr>
      <td align="right" style="width: 50%">当前正在执行的统计:</td>
      <td id="exeProcess"></td>
    </tr>
    <tr align="center">
    	<td colspan="2">
		    <input type="submit" name="Submit" id="Submit" value="提交" />&nbsp;&nbsp; 
			<input type="reset" name="reset" onclick="resetParam()" value="重置" />&nbsp;&nbsp; 
		    <input type="button" value="返回" onclick="history.go(-1);" />
	    </td>
    </tr>
  </table>
</form>
</body>
</html>